package com.idc.excel.cr;

import org.apache.commons.lang3.StringUtils;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.metadata.data.ReadCellData;

public class FormulaListener extends AnalysisEventListener<ReadCellData<Object>> {
	@Override
	public void invoke(ReadCellData<Object> rowData, AnalysisContext context) {
		String formula = rowData.getFormulaData().getFormulaValue();
		if (!StringUtils.isEmpty(formula)) {
			System.out.println("公式内容: " + formula);
		}
	}

	@Override
	public void doAfterAllAnalysed(AnalysisContext context) {

	}

	public static void main(String[] args) {

	}
}
